import http from '@/utils/Http'

export interface UserData {
    id: number,
    username: string,
    status: number,
    updateTime: string,
    createTime: string
}

export function userList(){
    return http<Array<UserData>>({
        method: 'get',
        url: '/user/userList',
    })
}

export interface AddUserParam {
    username: string,
    password: string
}

export const addUser = (data: AddUserParam) => {
    return http({
        url: '/user/addUser',
        method: 'post',
        data: data
    })
}